﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace EntityFrameworks.Web.Core.Configer
{
    /// <summary>
    /// 网站配置信息工厂
    /// </summary>
    public class WebConfigManager
    {
        /// <summary>
        /// 配置信息实体
        /// </summary>
        public static readonly WebConfigSection Instance = GetSection();

        private static WebConfigSection GetSection()
        {
            WebConfigSection config =
                ConfigurationManager.GetSection("WebConfigSection") as WebConfigSection;
            if (config == null)
                throw new ConfigurationErrorsException();
            return config;
        }
    }
}
